package com.example.controller;

import com.example.dto.User;
import com.example.repository.SysUserRepository;
import com.example.service.UserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class SysUserController {
    private final static Logger log = LoggerFactory.getLogger(SysUserController.class);

    @Autowired
    private UserService userService;

    @RequestMapping("/add")
    public void add(){
        User user = new User();
        user.setEmail("11111@qq.com");
        user.setPassword("aaaaaaaaaaaaaaaaaa");
        user.setTelNo("999999");
        user.setUserName("test");
        userService.addUser(user);
    }
}
